1. Field of the Invention
The present invention relates in general to printing systems for computers and in particular to a print system and method for providing wait-band alleviation of printers via host computer buffering.
2. Related Art
Most, if not all, computer systems utilize printers to transform images and data residing on a host computer device, such as a personal computer, into a physical hardcopy. The printer is usually bi-directional (allows two-way communication between the host computer and the printer) and is directly connected to the host computer device via standard communication cable. The host computer device typically has an operating system for running internal software applications and managing external hardware. One piece of external hardware includes a video monitor for interfacing a user with the computer system. When a user is working with an image or data on the host, the image or data can be stored on the host as a graphical or text based file. There are many different types of graphical formats for storing the file, most of which store the file in terms of additive red, green, blue (RGB) primary colors.
Most color printers use a combination of cyan, magenta, yellow, and black (CMYK) to create a visual perception of a wide range of colors. The image stored on the host as an RGB file must be converted to the CMYK format usable by the color printer and at the resolution of the printer. This conversion is typically done by means of a printer driver, which is usually a software package (containing software-driven components) installed on the host. A particular software printer driver for a particular printer works with applications running on the host that need to print data to that particular printer. Every printer typically has its own specific printer driver, which usually contains general software-driven functions, as well. as unique software-driven functions specific only to the particular printer.
Operating systems, such as the types made by the Microsoft Corporation, Redmond, Wash., usually include a device development kit (DDK) as a resource guide for developing printer drivers to work with the operating system. One operating system made by Microsoft includes a printing system having a xe2x80x9cUniversal Printer Driverxe2x80x9d (Unidriver) for carrying out print job requests on most types of printers. Typically, a software minidriver is developed for a particular printer to work with the Unidriver of the operating system. A printer minidriver is an executable file that provides device-driver support for a particular printer. It contains data that describes the capabilities, commands, and resident fonts of the particular printer. A printer minidriver also includes a set of required xe2x80x9centry pointsxe2x80x9d (receiving and transmitting ports) that the operating system graphic device interface calls to retrieve information about and to send information to the particular printer.
Although the minidriver contains xe2x80x9centry pointsxe2x80x9d, it does not actually carry out the actions requested by an interface component, such as a graphic device interface (GDI). Instead, it calls the Unidriver and provides the information that the Unidriver needs to carry out the requested actions on the device (such as printing text, rendering bitmaps, or advancing a page). Specifically, the minidriver is built so that it can accept requests from the operating system GDI, and then, in most cases, pass the requests to the Unidriver along with information that describes the capabilities, commands, and resident fonts of the particular printer.
In addition, the operating system discussed above by Microsoft has a print spooler (acronym for simultaneous peripheral operations on-line) and a language monitor are utilized for enabling print jobs to be routed to local and network printers. The print spooler accepts a data stream prepared by the GDI and/or a printer driver for output on a particular type of printer. The spooler delivers data to printers for printing, either directly or by playing back spooled files. The spooler manages the events and format conversions that result in the data being output on an application-designated printer. The spooler also manages a dynamic environment made up of printers, printer drivers, print providers, monitors, ports, and print jobs. The spooler maintains a registry of information to derive the number of components that are in the printer subsystem at any time and the unique name of each component. The spooler also keeps track of the current status of each component.
The language monitor normally configures a printer and monitors printer status for providing two-way communication between the computer and a bi-directional printer. Also, the language monitor can be used to add data, such as printer control information, to the print stream going to the printer. The language monitor is printer description language-specific. As such, each bi-directional printer has a specific language monitor developed for that particular printer. The language monitor is typically a software package having software-driven components, and can be comprised of one or several dynamic link library (DLL) files.
For example, code running on the host computer can request configuration and status information from the printer, and/or the printer can send unsolicited status information to the computer whenever certain events occur on the printer. The language monitor can also be used to add data, such as printer control information, to a data print stream sent to the printer. Generally, the language monitor implements all the bi-directional communication functionality between the host and printer, such as translating requests from the computer and either solicited or unsolicited responses from the printer.
Microsoft""s DDK illustrates a sample printer driver interacting with the language monitor and the spooler for a typical print sequence operating on the operating system discussed above. First, a printer driver requests instructions on how to render a print job on an associated printer and returns to the instructions on rendering the print job on the printer. Second, if the print job is not direct, the print job is spooled to the disk as a raw-format spool file. Each piece of the print job is appended to the spool file until the application signals that the job is complete. These steps are repeated many times to build a complete spool file. It should be noted that a direct print job occurs when a print job, which already has been spooled, is sent again as another print job. A direct print job goes directly to the printer instead of being rewritten as another spool file.
Next, a main thread is started that determines the best time to start playing back the spooled file to the printer. A thread is an executable command that can execute commands independently of other operations and commands. At the determined best time, the main thread makes a call to the language monitor to start a new playback thread to playback the spooled file. Because the started thread is a new thread, the thread: 1) invokes a function to read part of the spooled file off the disk; and 2) invokes the language monitor with a write function to send the data through the physical port connected to the bi-directional printer. Note that the playback thread steps are repeated until the end-of-file is reached on the spooled file (or the print job is canceled). After an end-of-file is reached (or a cancellation of the print job) the playback thread is terminated.
Although the printer can typically begin printing after receiving data from the language monitor, the data may be delayed due to various factors. For example, the complexity of the image may cause delays in the language monitor and/or spooler, which will cause delays in the overall print process. This is because whenever the spooler generates data and calls the driver, the spooler is not sending data to the language monitor. Also, whenever the language monitor processes and sends data to the printer, the spooler is not generating or sending data to the language monitor.
Specifically, after generation of data, such as a first band of data (a band of data is usually an arbitrary packet of print data containing information about the print job which can vary in size from several kilobytes to several megabytes), the spooler sends that first band of data to the language monitor. The language monitor processes the first band of data and sends the first band of data to the printer. However, no data, such as a second band of data, is generated and sent by the spooler to the language monitor during the processing and transmission of the data by the language monitor. This is because, according to the above architecture, the language monitor is busy processing the first band of data. In other words, the second band of data is not generated and sent to the language monitor until the first band of data is completely processed and transmitted by the language monitor. This means that the spooler is inactive for a period of time just after a band of data is generated and sent to the language monitor. Therefore, the spooler is not continuously operating, which creates delays and down time in the print process.
Consequently, if a print job is complex, the printer and language monitor are inactive while the spooler generates and sends data. Similarly, if after receiving the first band of data the printer""s memory becomes full (additional print data cannot be received by the printer) or ink has not dried yet, both the language monitor and the spooler must wait until more printer memory becomes available or until the ink has dried. This results in undesirable burst transfers, a phenomenon typically referred to in the art as wait-banding.
Wait-banding can occur as follows: a first band of data is generated; the first band of data is received by the printer (all memory is used); then the printer prints while the spooler and language monitor wait until more printer memory is available. After the spooler generates the first band of data, it has to wait for the language monitor to process and send the data and for the printer to print the data. After the printer is done with the first band of data, it returns to the spooler which spends, for example, 30 seconds generating a new band of data. That 30 seconds corresponds to a single wait-band.
One method of alleviating wait-banding includes using a printer heater. A printer heater provides faster printer ink drying time. However, it only addresses one cause of wait-banding, namely, ink drying times. Also, since a printer heater is expensive, it adds excessive production costs to the product. Another method of alleviating wait-banding includes adding more printer memory. Although additional printer memory allows more print data to be received by the printer, this later method addresses only one cause of wait-banding, namely limited printer memory. Also, since printer memory is expensive, it adds excessive production costs to the produce.
Several other methods of alleviating wait-banding include modifying the print media or the ink of the printer. Some types of printer paper and printer inks provide faster ink drying time. However, these modifications to the print media and the printer ink do not solve the computer/printer communication problem (direct cause of wait-banding) directly, but instead provide an indirect xe2x80x9cquick fixxe2x80x9d solution. Also, print media and printer ink are always in flux and changing, hence they are not a stable solution. In addition, since these methods involve external hardware modifications, they can be expensive.
One direct approach to alleviating wait-banding is with software control. This is accomplished by establishing a fixed delay with software control between each print pass. By the time the passes are complete, the printer has more page sector information available for printing. However, this approach disadvantageously increases the overall time needed to print any given page, even though page sector information is ready in advance of when the passes are made. In other words, this method unnecessarily decreases the throughput of the printer, which is a very important factor.
Therefore, what is needed is a direct solution to printer wait-banding which does not sacrifice printer throughput. What is also needed is an inexpensive solution to printer wait-banding. What is additionally needed is a stable solution to printer wait-banding. What is further needed is a printing system that allows data to be continuously generated and simultaneously sent while new data is generated.
Whatever the merits of the above mentioned systems and methods, they do not achieve the benefits of the present invention.
To overcome the limitations in the prior art described above, and to overcome other limitations that will become apparent upon reading and understanding the present specification, the present invention is a print system and method for providing wait-band alleviation of printers via host computer buffering. The print system of the present invention is embodied in a universal software-driven scheme with independent multithreading operations for efficiently controlling and maximizing print job performance.
The print system of the present invention includes a host computer connected to a printer, an operating system functioning on the host computer, an application running on the operating system and producing an image to be printed, and a printer driver interacting with the operating system for translating print data to a form readable by the printer. In addition, other components interact with the application and printer driver. Namely, the print system of the present invention further includes a spooler for generating and transmitting print data, a universal printer monitoring device, such as a language monitor, for processing and transmitting printer data to the printer and for providing two-way communication with the printer, and a status monitor for providing print status information and for canceling print jobs.
The universal software-driven buffering scheme and multithreading system of the present invention allows continuous throughput of data to the printer. For example, a first band of data is generated and a first thread (an execution of operation) is started to send and store the first band of data in the language monitor. Next, a second thread is started for processing the first band of data and sending from the language monitor to the printer. While the second thread processes the first band of data (immediately after the first thread sends the first band of data to the language monitor for storage), the first thread calls the spooler to generate and send a second band of data. Thus, the spooler operates at the same time the language monitor and the printer are performing operations. As a result, simultaneous operation is achieved to thereby alleviate wait-banding and to increase the overall throughput of the printer. In addition, the language monitor of the present invention has the ability to wait before sending print data to the printer. For some print jobs, wait-banding can be reduced if the print job is not started until the operating system generates several blocks of data for the printer. In these cases, the language monitor is capable of waiting an appropriate time before sending the print data to the printer.
A feature of the present invention is the universal capabilities of the software-driven buffering scheme and its adaptability to efficiently work with many printers and host computer systems. Another feature of the present invention is multithreading, which allows data to be continuously generated and sent while new data is generated simultaneously, thereby increasing printer throughput. An advantage of the present invention is that it is a direct solution to printer wait-banding without sacrificing printer throughput. Another advantage of the present invention is that it is inexpensive. Yet another advantage of the present invention is that it is universal and configurable for use with many printers. Therefore, the present invention has practical applications and tremendous real world value in the highly competitive computer/printer market.
The foregoing and still further features and advantages of the present invention as well as a more complete understanding thereof will be made apparent from a study of the following detailed description of the invention in connection with the accompanying drawings and appended claims.